package top.lshaci.learning.swagger3.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * TestController
 *
 * @author lshaci
 * @date 2020/9/11 15:58
 * @since 1.0.0
 */
@RestController
@RequestMapping("/test")
@Api(tags = "测试swagger3.0")
public class TestController {

    @GetMapping("/get")
    @ApiOperation("获取版本信息")
    public Object get() {
        Map<String, Object> data = new HashMap<>();
        data.put("name", "swagger");
        data.put("version", 3.0);
        return data;
    }
}
